package com.sfh.appversion.dto.resp;

import com.sfh.appversion.dao.entity.UserDO;
import lombok.Data;

import java.util.UUID;

@Data
public class UserRespDTO {

    private String token;
    private String userId;
    private String userType;
    private String userName;

    public static UserRespDTO create(UserDO userDO){

        UserRespDTO respDTO = new UserRespDTO();
        respDTO.userId = userDO.getUserId();
        respDTO.userName = userDO.getUserName();
        respDTO.userType = userDO.getUserType();
        respDTO.token = UUID.randomUUID().toString();
        return respDTO;
    }
}
